import request  from '@/utils/request';

import { OPS_URL, BASE_URL, USER_URL } from '@/config/query';
import { async } from 'q';

//列表查询
export async function queryPage(params = { pageSize: 10, pageNum: 1 }) {
  return request(`${OPS_URL}/user/page`, params)
}
//编辑查询
export async function queryInfoById(id) {
  return request(`${OPS_URL}/user/detail/${id}`)
}
//创建人员
export async function create(params) {
  return request(`${OPS_URL}/user/create`, params)
}
//更新操作
export async function update(params) {
  return request(`${OPS_URL}/user/modify`, params)
}

export async function lock(id) {
  return request(`${OPS_URL}/user/remove/${id}`)
}

export async function queryRoleList() {
  return request(`${OPS_URL}/role/list`)
}
//查询消控室列表
export async function queryFireRoomList() {
  return request(`${BASE_URL}/fire_room/list`)
}
//人员注销

export async function deletePerson(params) {
  return request(`${OPS_URL}/user/delete/${params}`)
}

export async function queryGroupList() {
  return request(`${OPS_URL}/group/list_by_token`)
}

export async function allotRoles(params) {
  return request(`${OPS_URL}/user/allot_roles`, params)
}

export async function allotGroups(params) {
  return request(`${OPS_URL}/user/allot_groups`, params)
}

export async function resetOtherPwd(params) {
  return request(`${OPS_URL}/user/reset_other_pwd`, params)
}
